package com.ssn.iterator.books;

public class BookIterator implements Iterator {
    int curr;
    private Books books;
    BookIterator(Books books){
        this.books = books;
        curr = 0;
    }
    @Override
    public boolean hasNext() {
        return curr < books.size();
    }

    @Override
    public Object next() {
        Book book =  books.get(curr);
        curr ++;
        return book;
    }
}
